/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.etop.beans;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author cjh(358319110@qq.com)
 */
@Entity
@Table(name = "pro_file")
public class ProFile {

    private int id;
    private String name;
    private Project project;
    private String file;
    private String userName;
    private Date uploadDate;

    public ProFile() {
    }

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    @ManyToOne
    @JoinColumn(name = "p_id")
    public Project getProject() {
        return project;
    }

    @Column(name = "file")
    public String getFile() {
        return file;
    }

    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    @Column(name = "upload_time")
    public Date getUploadDate() {
        return uploadDate;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setUploadDate(Date uploadDate) {
        this.uploadDate = uploadDate;
    }

    @Override
    public String toString() {
        return "ProFile{" + "id=" + id + ", name=" + name + ", project=" + project + ", file=" + file + ", userName=" + userName + ", uploadDate=" + uploadDate + '}';
    }

}
